ARCH=-m64

CC = gcc

CFLAGS = $(ARCH) -g

#folder containing the headers
INCLUDES = -I../include

# define library paths in addition to /usr/lib
#   if I wanted to include libraries not in /usr/lib I'd specify
#   their path using -Lpath, something like:
LFLAGS = -L$(shell pwd)/..

#Libraries to includes
LIBS = -ljjann$(ARCH) -lm -lconfig

#Examples to compile
SAMPLES = iris xor loadAndSave crossvalidation diabetesTest incrementalPruning

all : $(SAMPLES)

xor :
	$(CC) $(CFLAGS) $(LFLAGS) $(INCLUDES) xor_sample.c $(LIBS) -o xor
	chmod a+x xor
	mv xor ./bin/
	
loadAndSave :
	$(CC) $(CFLAGS) $(LFLAGS) $(INCLUDES) loadAndSave.c $(LIBS) -o loadAndSave
	chmod a+x loadAndSave
	mv loadAndSave ./bin/
	
crossvalidation :
	$(CC) $(CFLAGS) $(LFLAGS) $(INCLUDES) crossValidation.c $(LIBS) -o crossvalidation
	chmod a+x crossvalidation
	mv crossvalidation ./bin/

iris :
	cd iris-classification;make "ARCH=$(ARCH)"
	
diabetesTest:
	$(CC) $(CFLAGS) $(LFLAGS) $(INCLUDES) diabetesTest.c $(LIBS) -o diabetesTest
	chmod a+x diabetesTest
	mv diabetesTest ./bin/
	
incrementalPruning:
	$(CC) $(CFLAGS) $(LFLAGS) $(INCLUDES) incrementalPruningTest.c $(LIBS) -o incrementalPruning
	chmod a+x incrementalPruning
	mv incrementalPruning ./bin/
	
clean:
	cd iris-classification; make clean
	rm -f bin/*
	